@first
@hbc
@hbc_log
@fail
Feature: First feature
File name: first.feature
Relative path: features/first.feature
Given
I navigate to the front page
00:00:28.931
When
I enter "hbc"
00:00:00.081
Error: function timed out, ensure the promise resolves within 14000 milliseconds
at Timeout.(anonymous) (/home/runner/work/repo1/repo1/playwright/node_modules/@cucumber/cucumber/lib/time.js:64:20)
at listOnTimeout (node:internal/timers:581:17)
at process.processTimers (node:internal/timers:519:7)
And
I should see data
0s
@first
@hbc_log
Scenario: Open the html log of the above scenario then check around
Given
I open the html log at a predefined location
0s
// With Callbacks
Given (/^I open the html log at a predefined location$/, (callback) => {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
// With Promises
Given (/^I open the html log at a predefined location$/, () => {
// Write code here that turns the phrase above into concrete actions
return Promise.resolve('pending');
});
When
I am sure that the created date is new
0s
// With Callbacks
When (/^I am sure that the created date is new$/, (callback) => {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
// With Promises
When (/^I am sure that the created date is new$/, () => {
// Write code here that turns the phrase above into concrete actions
return Promise.resolve('pending');
});
Then
I will check the details result
0s
// With Callbacks
Then (/^I will check the details result$/, (callback) => {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
// With Promises
Then (/^I will check the details result$/, () => {
// Write code here that turns the phrase above into concrete actions
return Promise.resolve('pending');
});
And
the count should be correct
0s
// With Callbacks
And (/^the count should be correct$/, (callback) => {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
// With Promises
And (/^the count should be correct$/, () => {
// Write code here that turns the phrase above into concrete actions
return Promise.resolve('pending');
});
@first
@fail
Scenario: Sample test to return failure the point is to get a failed log so we can have various values reflected
Given
I open google
00:00:01.177
When
I search "hbc"
00:00:00.078
locator.waitFor: Timeout 10000ms exceeded.
Call log:
- waiting for locator('//xyz') to be visible
at Object.clickElement (/home/runner/work/repo1/repo1/playwright/tests/support/utils.js:46:19)
at World.(anonymous) (/home/runner/work/repo1/repo1/playwright/tests/steps/first.steps.js:84:14)